#include"MutationInsertion.h"
#include"RandomGenerator.h"
#include"Evaluation.h"

using namespace std;

void MutationInsertion::Mutate(Solution& solution)
{
	RandomGen<int> random(0 , Evaluation::GetJobNum() - 1);
	int integerToMove;
	while(true)
	{
		int movingIndex = random();
		int insertingIndex = random();
		if(movingIndex != insertingIndex)
		{
			solution = solution.getNeighbor(movingIndex , insertingIndex);
			break;
		}
	}
}